﻿using Yxinmt.Interface;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;

namespace Yxinmt.Windows.Meeting
{
    public class MainWindow2
    { 
        public MainWindow2()
        {
            MainWindow.GetWindowFunc = (mainWindow) =>
            {
                return GetWindow(mainWindow);
            };
        }

        IWindow GetWindow(MainWindow win)
        {
            switch (win.Name)
            {
                case "Index": return new Index(win.Window, win.Parameters, win.ClientConfig, win);
                case "SelectFile": return new SelectFile(win.Window, win.Parameters);
                case "SecondIndex": return new SecondIndex(win.Window, win.Parameters);
                case "Rename": return new Rename(win.Window, win.Parameters);
                case "WebPage": return new WebPage(win.Window, win.Parameters);
                case "MeetingNotice": return new MeetingNotice(win.Window, win.Parameters);
                case "WebAdminPage": return new WebAdminPage(win.Window, win.Parameters);
                case "VideoPlay": return new VideoPlay(win.Window, null, null, win.Parameters);
                case "ButtonView": return new ButtonView(win.Window, win.Parameters);
                //case "DocumentViewing": return new DocumentViewing(win.Window, win.Parameters, win.ClientConfig);
                default: return new DefaultPage(win.Name, win.Window, win.Parameters);
            }
        }
    }
}
